package com.campus.common.message;

import com.campus.common.vo.Classroom;
import java.io.Serializable;

/**
 * 管理员课程/班级操作请求
 */
public class AdminCourseRequest implements Serializable {

    public enum Action {
        // 课程相关操作
        VIEW_ALL_COURSES,        // 查看所有课程（带班级信息）
        QUERY_COURSE,            // 按课程ID或课程名称查询
        ADD_COURSE,              // 新增课程
        UPDATE_COURSE,           // 修改课程信息（编号、名称、学分）
        DELETE_COURSE,           // ✅ 删除课程

        // 班级相关操作
        ADD_CLASSROOM,           // 增加教学班
        DELETE_CLASSROOM,        // 删除教学班
        UPDATE_CLASSROOM,        // 修改班级信息（时间、地点、容量等）

        // 学生名单相关操作
        ADD_STUDENT_TO_CLASS,      // 给班级添加学生
        REMOVE_STUDENT_FROM_CLASS, // 从班级移除学生
        VIEW_STUDENTS_IN_CLASS,    // 查看某个班级的学生名单

        // 教师相关操作
        VIEW_ALL_TEACHERS          // 获取所有教师
    }

    private Action action;       // 请求动作
    private String courseId;     // 课程ID
    private String courseName;   // 课程名称
    private String keyword;      // 🔍 查询关键字（ID 或 名称都可以）
    private Integer credit;      // 学分
    private String department;   // 所属院系
    private String classId;      // 班级ID
    private String studentId;    // 学生ID（增删班级学生时用）
    private Classroom classroom; // 班级对象（新增/修改班级时用）

    public AdminCourseRequest() {}

    public AdminCourseRequest(Action action, String courseId, String courseName, String keyword,
                              Integer credit, String classId, String studentId, Classroom classroom,
                              String department) {
        this.action = action;
        this.courseId = courseId;
        this.courseName = courseName;
        this.keyword = keyword;
        this.credit = credit;
        this.classId = classId;
        this.studentId = studentId;
        this.classroom = classroom;
        this.department = department;
    }

    // ===== Getter / Setter =====
    public Action getAction() { return action; }
    public void setAction(Action action) { this.action = action; }

    public String getCourseId() { return courseId; }
    public void setCourseId(String courseId) { this.courseId = courseId; }

    public String getCourseName() { return courseName; }
    public void setCourseName(String courseName) { this.courseName = courseName; }

    public String getDepartment() { return department; }
    public void setDepartment(String department) { this.department = department; }

    public String getKeyword() { return keyword; }
    public void setKeyword(String keyword) { this.keyword = keyword; }

    public Integer getCredit() { return credit; }
    public void setCredit(Integer credit) { this.credit = credit; }

    public String getClassId() { return classId; }
    public void setClassId(String classId) { this.classId = classId; }

    public String getStudentId() { return studentId; }
    public void setStudentId(String studentId) { this.studentId = studentId; }

    public Classroom getClassroom() { return classroom; }
    public void setClassroom(Classroom classroom) { this.classroom = classroom; }
}
